package com.huika.dealontop.support.domain;

import java.util.List;

/**
 * Author: Victor Wu <br/>
 * Email: victor-wu*foxmail.com <br/>
 * Time: 2015/11/20 17:58 <br/>
 * Description: 订单详情
 */
public class ProductDetailsBean {


    /**
     * ProductId : 10823583988
     * CategoryId : 973841151
     * RSAProductId : JG5c57kv1YxuEim3MGt3KOIgVXJWelUWAyZVHpguykrlzjrW6c3h/dbiJhzmnBOjLFQsde8S7rwV3HR0vKVuD+fHKPDo1jVVKpgNNDZlX+GcelLitq648DooPcfA6G8zoLkJOKm1IWWl5U+a7c8SGK1YKaeEkMzloLp4PE4e+G8=
     * RSAMerchantID : VOCayBbCgRPCzvmSptfZrHGND1GxtUPvH/BBDXqpEJYVQqhmbn2zndtEOAKDrssOtWJRa6uIC7mEk6j8bWbXM45WxFjYmsAdtH7ccDqTVKjoiwxoJTaVp/iY29lXcOMhcBCAnd0fsche2rtCIjgc0aIP76Rh2mFfc0VQYhtHcYc=
     * ProductName : 法国恢复规划更符合法规和飞返回个很反感规范和规范化发规划法规和法国发的鬼地方鬼地方鬼打鬼
     * PurchasedNum : 1
     * ProductIntroduction : <img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAMDzVAAESo37TALY387.jpg" alt="" /><img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAfNFrAAD_7jsFmLU010.jpg" alt="" /><img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAT7SOAAGA9RjPrtQ150.jpg" alt="" /><img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAV9h6AAJbxHE9aRo135.jpg" alt="" /><img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAAs2HAADpLUAFzAA959.jpg" alt="" /><img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOALwvLAADzRlCcspw829.jpg" alt="" /><img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAcHpFAAH0LQOLMKY117.jpg" alt="" /><img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAGweLAADlRLDiai8100.jpg" alt="" /><img src="http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAE8RIAAHH3rCbPsg844.jpg" alt="" />
     * SalesService :
     * SalePrice : 1500.0
     * MarketPrice : 1500.0
     * ClickRate : 0
     * FreeShipping : false
     * IsServer : false
     * Discount : 1.0
     * IsBespeak : false
     * GeneralHolidays : false
     * IsUniversalTime : false
     * CityId : 150
     * MerchantID : 9770717269
     * MerchantName : 惠卡世纪集团有限公司泰国分部
     * MerchantTel : 0218547500
     * MerchantPhone : 1212
     * MerchantAddress : 民乐圆梦科技大厦2楼
     * Longitude : 1448827800000
     * Latitude : 1448827800000
     * StartDate : 1448827800000
     * EndDate : 1456506000000
     * SurplusTime : 7.6556741999389E9
     * PrdoctRuleName :
     * UsePeriod : 发对规范的跟风
     * BespeakRemind : 梵蒂冈地方刚发的
     * UseLimit : 地方官方的跟风
     * Other : 地方官方的跟风
     * TotalEnvironmentScore : 0.05
     * TotalPriceScore : 0.05
     * TotalScore : 0.05
     * TotalServiceScore : 0.05
     * CommentCount : 0
     * MerchantServices : {"IsFreeWifi":true,"IsFreeParking":true,"IsFreeDrinks":true,"IsDoorService":true,"IsGift":true,"IsDessert":true}
     */

    private ProductBean Product;
    /**
     * Product : {"ProductId":10823583988,"CategoryId":973841151,"RSAProductId":"JG5c57kv1YxuEim3MGt3KOIgVXJWelUWAyZVHpguykrlzjrW6c3h/dbiJhzmnBOjLFQsde8S7rwV3HR0vKVuD+fHKPDo1jVVKpgNNDZlX+GcelLitq648DooPcfA6G8zoLkJOKm1IWWl5U+a7c8SGK1YKaeEkMzloLp4PE4e+G8=","RSAMerchantID":"VOCayBbCgRPCzvmSptfZrHGND1GxtUPvH/BBDXqpEJYVQqhmbn2zndtEOAKDrssOtWJRa6uIC7mEk6j8bWbXM45WxFjYmsAdtH7ccDqTVKjoiwxoJTaVp/iY29lXcOMhcBCAnd0fsche2rtCIjgc0aIP76Rh2mFfc0VQYhtHcYc=","ProductName":"法国恢复规划更符合法规和飞返回个很反感规范和规范化发规划法规和法国发的鬼地方鬼地方鬼打鬼","PurchasedNum":1,"ProductIntroduction":"<img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAMDzVAAESo37TALY387.jpg\" alt=\"\" /><img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAfNFrAAD_7jsFmLU010.jpg\" alt=\"\" /><img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAT7SOAAGA9RjPrtQ150.jpg\" alt=\"\" /><img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAV9h6AAJbxHE9aRo135.jpg\" alt=\"\" /><img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAAs2HAADpLUAFzAA959.jpg\" alt=\"\" /><img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOALwvLAADzRlCcspw829.jpg\" alt=\"\" /><img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAcHpFAAH0LQOLMKY117.jpg\" alt=\"\" /><img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAGweLAADlRLDiai8100.jpg\" alt=\"\" /><img src=\"http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzcOAE8RIAAHH3rCbPsg844.jpg\" alt=\"\" />","SalesService":"","SalePrice":1500,"MarketPrice":1500,"ClickRate":0,"FreeShipping":false,"IsServer":false,"Discount":1,"IsBespeak":false,"GeneralHolidays":false,"IsUniversalTime":false,"CityId":150,"MerchantID":9770717269,"MerchantName":"惠卡世纪集团有限公司泰国分部","MerchantTel":"0218547500","MerchantPhone":"1212","MerchantAddress":"民乐圆梦科技大厦2楼","Longitude":1448827800000,"Latitude":1448827800000,"StartDate":1448827800000,"EndDate":1456506000000,"SurplusTime":7.6556741999389E9,"PrdoctRuleName":"","UsePeriod":"发对规范的跟风","BespeakRemind":"梵蒂冈地方刚发的","UseLimit":"地方官方的跟风","Other":"地方官方的跟风","TotalEnvironmentScore":0.05,"TotalPriceScore":0.05,"TotalScore":0.05,"TotalServiceScore":0.05,"CommentCount":0,"MerchantServices":{"IsFreeWifi":true,"IsFreeParking":true,"IsFreeDrinks":true,"IsDoorService":true,"IsGift":true,"IsDessert":true}}
     * ProductPicUrlList : ["http://192.168.16.218/pm1/M00/09/30/wKgQ2lZWzbeAY0v2AAB1m49Qx30818.jpg"]
     * PackageSelect : [{"SkuName":"梵蒂冈地方规定","SKU_ProducId":10823583990,"Stock":98,"skuHKPrice":1500,"skuMarketPrice":1500}]
     */

    private List<String> ProductPicUrlList;
    /**
     * SkuName : 梵蒂冈地方规定
     * SKU_ProducId : 10823583990
     * Stock : 98
     * skuHKPrice : 1500
     * skuMarketPrice : 1500
     */

    private List<PackageSelectBean> PackageSelect;

    public void setProduct(ProductBean Product) {
        this.Product = Product;
    }

    public void setProductPicUrlList(List<String> ProductPicUrlList) {
        this.ProductPicUrlList = ProductPicUrlList;
    }

    public void setPackageSelect(List<PackageSelectBean> PackageSelect) {
        this.PackageSelect = PackageSelect;
    }

    public ProductBean getProduct() {
        return Product;
    }

    public List<String> getProductPicUrlList() {
        return ProductPicUrlList;
    }

    public List<PackageSelectBean> getPackageSelect() {
        return PackageSelect;
    }

    public static class ProductBean {
        private long ProductId;
        private int CategoryId;
        private String RSAProductId;
        private String RSAMerchantID;
        private String ProductName;
        private int PurchasedNum;
        private String ProductIntroduction;
        private String SalesService;
        private double SalePrice;
        private double MarketPrice;
        private int ClickRate;
        private boolean FreeShipping;
        private boolean IsServer;
        private double Discount;
        private int CityId;
        private long MerchantID;
        private String MerchantName;
        private String MerchantTel;
        private String MerchantPhone;
        private String MerchantAddress;
        private double Longitude;
        private double Latitude;
        private long StartDate;
        private long EndDate;
        private double SurplusTime;
        private String PrdoctRuleName;
        private String UsePeriod;
        private String BespeakRemind;
        private String UseLimit;
        private String Other;
        private double TotalEnvironmentScore;
        private double TotalPriceScore;
        private double TotalScore;
        private double TotalServiceScore;
        private int CommentCount;
        private int merchantCount;
        private int shopCartProductCount;
        private boolean IsBespeak; //是否需要预约
        private boolean IsUniversalTime; //是否全时段通用
        private boolean GeneralHolidays; //是否节假日通用
        private int Status; //商品状态(未提交=1,待审核=2，审核不通过=3，已上架=4，已下架=5)
        private String Ext; //分机
        private boolean IsSale; //是否是预售商品
        /**
         * IsFreeWifi : true
         * IsFreeParking : true
         * IsFreeDrinks : true
         * IsDoorService : true
         * IsGift : true
         * IsDessert : true
         */

        private MerchantServicesBean MerchantServices;

        public void setProductId(long ProductId) {
            this.ProductId = ProductId;
        }

        public void setCategoryId(int CategoryId) {
            this.CategoryId = CategoryId;
        }

        public void setRSAProductId(String RSAProductId) {
            this.RSAProductId = RSAProductId;
        }

        public void setRSAMerchantID(String RSAMerchantID) {
            this.RSAMerchantID = RSAMerchantID;
        }

        public void setProductName(String ProductName) {
            this.ProductName = ProductName;
        }

        public void setPurchasedNum(int PurchasedNum) {
            this.PurchasedNum = PurchasedNum;
        }

        public void setProductIntroduction(String ProductIntroduction) {
            this.ProductIntroduction = ProductIntroduction;
        }

        public void setSalesService(String SalesService) {
            this.SalesService = SalesService;
        }

        public void setSalePrice(double SalePrice) {
            this.SalePrice = SalePrice;
        }

        public void setMarketPrice(double MarketPrice) {
            this.MarketPrice = MarketPrice;
        }

        public void setClickRate(int ClickRate) {
            this.ClickRate = ClickRate;
        }

        public void setFreeShipping(boolean FreeShipping) {
            this.FreeShipping = FreeShipping;
        }

        public void setIsServer(boolean IsServer) {
            this.IsServer = IsServer;
        }

        public void setDiscount(double Discount) {
            this.Discount = Discount;
        }

        public void setIsBespeak(boolean IsBespeak) {
            this.IsBespeak = IsBespeak;
        }

        public void setGeneralHolidays(boolean GeneralHolidays) {
            this.GeneralHolidays = GeneralHolidays;
        }

        public void setIsUniversalTime(boolean IsUniversalTime) {
            this.IsUniversalTime = IsUniversalTime;
        }

        public void setCityId(int CityId) {
            this.CityId = CityId;
        }

        public void setMerchantID(long MerchantID) {
            this.MerchantID = MerchantID;
        }

        public void setMerchantName(String MerchantName) {
            this.MerchantName = MerchantName;
        }

        public void setMerchantTel(String MerchantTel) {
            this.MerchantTel = MerchantTel;
        }

        public void setMerchantPhone(String MerchantPhone) {
            this.MerchantPhone = MerchantPhone;
        }

        public void setMerchantAddress(String MerchantAddress) {
            this.MerchantAddress = MerchantAddress;
        }

        public void setLongitude(double Longitude) {
            this.Longitude = Longitude;
        }

        public void setLatitude(double Latitude) {
            this.Latitude = Latitude;
        }

        public void setStartDate(long StartDate) {
            this.StartDate = StartDate;
        }

        public void setEndDate(long EndDate) {
            this.EndDate = EndDate;
        }

        public void setSurplusTime(double SurplusTime) {
            this.SurplusTime = SurplusTime;
        }

        public void setPrdoctRuleName(String PrdoctRuleName) {
            this.PrdoctRuleName = PrdoctRuleName;
        }

        public void setUsePeriod(String UsePeriod) {
            this.UsePeriod = UsePeriod;
        }

        public void setBespeakRemind(String BespeakRemind) {
            this.BespeakRemind = BespeakRemind;
        }

        public void setUseLimit(String UseLimit) {
            this.UseLimit = UseLimit;
        }

        public void setOther(String Other) {
            this.Other = Other;
        }

        public void setTotalEnvironmentScore(double TotalEnvironmentScore) {
            this.TotalEnvironmentScore = TotalEnvironmentScore;
        }

        public void setTotalPriceScore(double TotalPriceScore) {
            this.TotalPriceScore = TotalPriceScore;
        }

        public void setTotalScore(double TotalScore) {
            this.TotalScore = TotalScore;
        }

        public void setTotalServiceScore(double TotalServiceScore) {
            this.TotalServiceScore = TotalServiceScore;
        }

        public void setCommentCount(int CommentCount) {
            this.CommentCount = CommentCount;
        }

        public void setMerchantServices(MerchantServicesBean MerchantServices) {
            this.MerchantServices = MerchantServices;
        }

        public long getProductId() {
            return ProductId;
        }

        public int getCategoryId() {
            return CategoryId;
        }

        public String getRSAProductId() {
            return RSAProductId;
        }

        public String getRSAMerchantID() {
            return RSAMerchantID;
        }

        public String getProductName() {
            return ProductName;
        }

        public int getPurchasedNum() {
            return PurchasedNum;
        }

        public String getProductIntroduction() {
            return ProductIntroduction;
        }

        public String getSalesService() {
            return SalesService;
        }

        public double getSalePrice() {
            return SalePrice;
        }

        public double getMarketPrice() {
            return MarketPrice;
        }

        public int getClickRate() {
            return ClickRate;
        }

        public boolean isFreeShipping() {
            return FreeShipping;
        }

        public boolean isIsServer() {
            return IsServer;
        }

        public double getDiscount() {
            return Discount;
        }

        public boolean isIsBespeak() {
            return IsBespeak;
        }

        public boolean isGeneralHolidays() {
            return GeneralHolidays;
        }

        public boolean isIsUniversalTime() {
            return IsUniversalTime;
        }

        public int getCityId() {
            return CityId;
        }

        public long getMerchantID() {
            return MerchantID;
        }

        public String getMerchantName() {
            return MerchantName;
        }

        public String getMerchantTel() {
            return MerchantTel;
        }

        public String getMerchantPhone() {
            return MerchantPhone;
        }

        public String getMerchantAddress() {
            return MerchantAddress;
        }

        public double getLongitude() {
            return Longitude;
        }

        public double getLatitude() {
            return Latitude;
        }

        public long getStartDate() {
            return StartDate;
        }

        public long getEndDate() {
            return EndDate;
        }

        public double getSurplusTime() {
            return SurplusTime;
        }

        public String getPrdoctRuleName() {
            return PrdoctRuleName;
        }

        public String getUsePeriod() {
            return UsePeriod;
        }

        public String getBespeakRemind() {
            return BespeakRemind;
        }

        public String getUseLimit() {
            return UseLimit;
        }

        public String getOther() {
            return Other;
        }

        public double getTotalEnvironmentScore() {
            return TotalEnvironmentScore;
        }

        public double getTotalPriceScore() {
            return TotalPriceScore;
        }

        public double getTotalScore() {
            return TotalScore;
        }

        public double getTotalServiceScore() {
            return TotalServiceScore;
        }

        public int getCommentCount() {
            return CommentCount;
        }

        public MerchantServicesBean getMerchantServices() {
            return MerchantServices;
        }

        public int getShopCartProductCount() {
            return shopCartProductCount;
        }

        public void setShopCartProductCount(int shopCartProductCount) {
            this.shopCartProductCount = shopCartProductCount;
        }

        public String getExt() {
            return Ext;
        }

        public void setExt(String ext) {
            Ext = ext;
        }

        public int getStatus() {
            return Status;
        }

        public void setStatus(int status) {
            Status = status;
        }

        public int getMerchantCount() {
            return merchantCount;
        }

        public void setMerchantCount(int merchantCount) {
            this.merchantCount = merchantCount;
        }

        public boolean isSale() {
            return IsSale;
        }

        public void setIsSale(boolean isSale) {
            IsSale = isSale;
        }

        public static class MerchantServicesBean {
            private boolean IsFreeWifi;
            private boolean IsFreeParking;
            private boolean IsFreeDrinks;
            private boolean IsDoorService;
            private boolean IsGift;
            private boolean IsDessert;

            public void setIsFreeWifi(boolean IsFreeWifi) {
                this.IsFreeWifi = IsFreeWifi;
            }

            public void setIsFreeParking(boolean IsFreeParking) {
                this.IsFreeParking = IsFreeParking;
            }

            public void setIsFreeDrinks(boolean IsFreeDrinks) {
                this.IsFreeDrinks = IsFreeDrinks;
            }

            public void setIsDoorService(boolean IsDoorService) {
                this.IsDoorService = IsDoorService;
            }

            public void setIsGift(boolean IsGift) {
                this.IsGift = IsGift;
            }

            public void setIsDessert(boolean IsDessert) {
                this.IsDessert = IsDessert;
            }

            public boolean isIsFreeWifi() {
                return IsFreeWifi;
            }

            public boolean isIsFreeParking() {
                return IsFreeParking;
            }

            public boolean isIsFreeDrinks() {
                return IsFreeDrinks;
            }

            public boolean isIsDoorService() {
                return IsDoorService;
            }

            public boolean isIsGift() {
                return IsGift;
            }

            public boolean isIsDessert() {
                return IsDessert;
            }
        }
    }

    public static class PackageSelectBean implements Comparable<PackageSelectBean> {
        /*
        {
                "SkuName": "梵蒂冈地方规定",
                "SKU_ProducId": 10823583990,
                "Stock": 98,
                "skuHKPrice": 1500,
                "skuMarketPrice": 1500
            }

         */
        private long SKU_ProducId;
        private String SkuName;
        private int Stock;
        private Double skuHKPrice;
        private Double skuMarketPrice;
        public boolean isSelect = false;

        public void setSKU_ProducId(long SKU_ProducId) {
            this.SKU_ProducId = SKU_ProducId;
        }

        public void setSkuName(String SkuName) {
            this.SkuName = SkuName;
        }

        public void setStock(int Stock) {
            this.Stock = Stock;
        }

        public void setSkuHKPrice(double skuHKPrice) {
            this.skuHKPrice = skuHKPrice;
        }

        public long getSKU_ProducId() {
            return SKU_ProducId;
        }

        public String getSkuName() {
            return SkuName;
        }

        public int getStock() {
            return Stock;
        }

        public Double getSkuHKPrice() {
            return skuHKPrice;
        }

        /**
         * 折扣率 需要 客户端自行计算
         * 计算公式 ： 套餐折扣率 = (1-( skuHKPrice/ skuMarketPrice))*100%}
         *
         * @return
         */
        public double getDiscount() {
            if (skuMarketPrice == 0) {
                return 0;
            }
            return (1 - (skuHKPrice / skuMarketPrice)) * 100;
        }

        public Double getSkuMarketPrice() {
            return skuMarketPrice;
        }

        public void setSkuMarketPrice(double skuMarketPrice) {
            this.skuMarketPrice = skuMarketPrice;
        }

        /**
         * 按市场价由低到高
         *
         * @param o
         * @return
         */
        @Override
        public int compareTo(PackageSelectBean o) {
            if (o != null) {
                return this.getSkuHKPrice().compareTo(o.getSkuHKPrice());
            }
            return 1;
        }
    }
}
